<template>
	<view class="content">
		<view class="iconfont" :style="{color: color, fontSize: fontSize}" v-html="type" @click="toclick"></view>
	</view>
</template>

<script>
	export default {
		props: {
			type: {
				type: String,
				default: '&#xe644;'
			},
			color: {
				type: String,
				default: '#666666'
			},
			fontSize: {
				type: String,
				default: '34rpx'
			}
		},
		methods: {
			toclick() {
				this.$emit('click');
			}
		}
	}
</script>

<style scoped>
	.content{
		display: flex;
		align-items: center;
		justify-content: center;
	}
@font-face {
  font-family: 'iconfont';
  src: url('/static/css/iconfont.woff2?t=1646488823228') format('woff2'),
       url('/static/css/iconfont.woff?t=1646488823228') format('woff'),
       url('/static/css/iconfont.ttf?t=1646488823228') format('truetype');
}

	.iconfont {
	  font-family: "iconfont" !important;
	  font-size: 16px;
	  font-style: normal;
	  -webkit-font-smoothing: antialiased;
	  -moz-osx-font-smoothing: grayscale;
	}

</style>
